namespace IQIGame.Onigao.Framework
{
    public class DefualtObjectOperationHelper<T> : IPoolObjectOperationHelper<T> where T : class, IPoolObject, new()
    {
        public virtual T Create(string assetName)
        {
            T obj = ClassPool.Get<T>();
            obj.OnInit(assetName);
            return obj;
        }

        public virtual void DestroyObject(T obj)
        {
            ClassPool.Put(obj);
        }

        /// <summary>
        /// Dispose DefualtObjectOperationHelper
        /// </summary>
        public virtual void Dispose()
        {

        }
    }
}
